#!/bin/bash
limit=4
count=0
while [ $count -le $limit ]
do
   echo -n "Can I haz cheezburger? "
   read ans
   if [ "$ans" = "Y" ] || [ "$ans" = "y" ] 
   then
    echo "Thanks!"
    exit 0
   else
    echo "Grrrr ... I scratch!\n"
   fi
done
